<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Superpixel Benchmark: ImageGraph Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Superpixel Benchmark
   </div>
   <div id="projectbrief">Superpixel benchmark, tools and algorithms.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classImageGraph-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ImageGraph Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents an image graph, consisting of one node per pixel which are 4-connected.  
 <a href="classImageGraph.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="image__graph_8h_source.html">image_graph.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab63f706cd24f1650af6486b2261e346a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#ab63f706cd24f1650af6486b2261e346a">ImageGraph</a> ()</td></tr>
<tr class="memdesc:ab63f706cd24f1650af6486b2261e346a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#ab63f706cd24f1650af6486b2261e346a">More...</a><br /></td></tr>
<tr class="separator:ab63f706cd24f1650af6486b2261e346a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72190c2a9a296ead91b3c4d3282432bc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#a72190c2a9a296ead91b3c4d3282432bc">ImageGraph</a> (int N)</td></tr>
<tr class="memdesc:a72190c2a9a296ead91b3c4d3282432bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an image graph with the given exact number of nodes.  <a href="#a72190c2a9a296ead91b3c4d3282432bc">More...</a><br /></td></tr>
<tr class="separator:a72190c2a9a296ead91b3c4d3282432bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07da5c2a67a5ddc3deea92596a81f997"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#a07da5c2a67a5ddc3deea92596a81f997">operator=</a> (const <a class="el" href="classImageGraph.html">ImageGraph</a> &amp;graph)</td></tr>
<tr class="memdesc:a07da5c2a67a5ddc3deea92596a81f997"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator.  <a href="#a07da5c2a67a5ddc3deea92596a81f997">More...</a><br /></td></tr>
<tr class="separator:a07da5c2a67a5ddc3deea92596a81f997"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5549bd8ab5b3c1b6fb524d33858c0afe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#a5549bd8ab5b3c1b6fb524d33858c0afe">setNode</a> (int n, <a class="el" href="classImageNode.html">ImageNode</a> &amp;node)</td></tr>
<tr class="memdesc:a5549bd8ab5b3c1b6fb524d33858c0afe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the node of the given index.  <a href="#a5549bd8ab5b3c1b6fb524d33858c0afe">More...</a><br /></td></tr>
<tr class="separator:a5549bd8ab5b3c1b6fb524d33858c0afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc5954519dfc70ffc20b0c069e918d2d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#adc5954519dfc70ffc20b0c069e918d2d">addNode</a> (<a class="el" href="classImageNode.html">ImageNode</a> &amp;node)</td></tr>
<tr class="memdesc:adc5954519dfc70ffc20b0c069e918d2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new node.  <a href="#adc5954519dfc70ffc20b0c069e918d2d">More...</a><br /></td></tr>
<tr class="separator:adc5954519dfc70ffc20b0c069e918d2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad77bd1b2368e874bf2e5c67eaced6905"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#ad77bd1b2368e874bf2e5c67eaced6905">addEdge</a> (<a class="el" href="classImageEdge.html">ImageEdge</a> &amp;edge)</td></tr>
<tr class="memdesc:ad77bd1b2368e874bf2e5c67eaced6905"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new edge.  <a href="#ad77bd1b2368e874bf2e5c67eaced6905">More...</a><br /></td></tr>
<tr class="separator:ad77bd1b2368e874bf2e5c67eaced6905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae238a2319db880455dd385c3f51cf1f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classImageNode.html">ImageNode</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#aae238a2319db880455dd385c3f51cf1f">getNode</a> (int n)</td></tr>
<tr class="separator:aae238a2319db880455dd385c3f51cf1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa62bfaa81c71692d0ff3f06c800ccd0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classImageEdge.html">ImageEdge</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#aa62bfaa81c71692d0ff3f06c800ccd0a">getEdge</a> (int e)</td></tr>
<tr class="memdesc:aa62bfaa81c71692d0ff3f06c800ccd0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the e-th edge in the current sorting.  <a href="#aa62bfaa81c71692d0ff3f06c800ccd0a">More...</a><br /></td></tr>
<tr class="separator:aa62bfaa81c71692d0ff3f06c800ccd0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9dc95412a7f22277475b1ddb2e3a963"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#ad9dc95412a7f22277475b1ddb2e3a963">getNumNodes</a> ()</td></tr>
<tr class="memdesc:ad9dc95412a7f22277475b1ddb2e3a963"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of nodes.  <a href="#ad9dc95412a7f22277475b1ddb2e3a963">More...</a><br /></td></tr>
<tr class="separator:ad9dc95412a7f22277475b1ddb2e3a963"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a871c65e9e308b068341fc618c1afb63f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#a871c65e9e308b068341fc618c1afb63f">getNumEdges</a> ()</td></tr>
<tr class="memdesc:a871c65e9e308b068341fc618c1afb63f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of edges.  <a href="#a871c65e9e308b068341fc618c1afb63f">More...</a><br /></td></tr>
<tr class="separator:a871c65e9e308b068341fc618c1afb63f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6bd5512e2e8cec1445d24f5b1f670f8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#ab6bd5512e2e8cec1445d24f5b1f670f8">getNumComponents</a> ()</td></tr>
<tr class="memdesc:ab6bd5512e2e8cec1445d24f5b1f670f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number of connected components.  <a href="#ab6bd5512e2e8cec1445d24f5b1f670f8">More...</a><br /></td></tr>
<tr class="separator:ab6bd5512e2e8cec1445d24f5b1f670f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c618f7f1fed0e358b0351af6c541d71"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#a8c618f7f1fed0e358b0351af6c541d71">sortEdges</a> ()</td></tr>
<tr class="memdesc:a8c618f7f1fed0e358b0351af6c541d71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort the edges by weight.  <a href="#a8c618f7f1fed0e358b0351af6c541d71">More...</a><br /></td></tr>
<tr class="separator:a8c618f7f1fed0e358b0351af6c541d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7dbef0113820b967655dd229ff68ccc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classImageNode.html">ImageNode</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#ab7dbef0113820b967655dd229ff68ccc">findNodeComponent</a> (<a class="el" href="classImageNode.html">ImageNode</a> &amp;n)</td></tr>
<tr class="memdesc:ab7dbef0113820b967655dd229ff68ccc"><td class="mdescLeft">&#160;</td><td class="mdescRight">When two nodes get merged, the first node is assigned the id of the second node as label. By traversing this labeling, the current component of each node (that is, pixel) can easily be identified and the label can be updated for efficiency.  <a href="#ab7dbef0113820b967655dd229ff68ccc">More...</a><br /></td></tr>
<tr class="separator:ab7dbef0113820b967655dd229ff68ccc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b39c32164fbca6272c5684577941e46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classImageGraph.html#a7b39c32164fbca6272c5684577941e46">merge</a> (<a class="el" href="classImageNode.html">ImageNode</a> &amp;S_n, <a class="el" href="classImageNode.html">ImageNode</a> &amp;S_m, <a class="el" href="classImageEdge.html">ImageEdge</a> &amp;e)</td></tr>
<tr class="memdesc:a7b39c32164fbca6272c5684577941e46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Merge two pixels (that is merge two nodes).  <a href="#a7b39c32164fbca6272c5684577941e46">More...</a><br /></td></tr>
<tr class="separator:a7b39c32164fbca6272c5684577941e46"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents an image graph, consisting of one node per pixel which are 4-connected. </p>
<dl class="section author"><dt>Author</dt><dd>David Stutz </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab63f706cd24f1650af6486b2261e346a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ImageGraph::ImageGraph </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a class="anchor" id="a72190c2a9a296ead91b3c4d3282432bc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ImageGraph::ImageGraph </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs an image graph with the given exact number of nodes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">N</td><td>number of nodes to allocate </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad77bd1b2368e874bf2e5c67eaced6905"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ImageGraph::addEdge </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classImageEdge.html">ImageEdge</a> &amp;&#160;</td>
          <td class="paramname"><em>edge</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Add a new edge. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">edge</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="adc5954519dfc70ffc20b0c069e918d2d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ImageGraph::addNode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classImageNode.html">ImageNode</a> &amp;&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Add a new node. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab7dbef0113820b967655dd229ff68ccc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classImageNode.html">ImageNode</a>&amp; ImageGraph::findNodeComponent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classImageNode.html">ImageNode</a> &amp;&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>When two nodes get merged, the first node is assigned the id of the second node as label. By traversing this labeling, the current component of each node (that is, pixel) can easily be identified and the label can be updated for efficiency. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>node to find component for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>node representing found component </dd></dl>

</div>
</div>
<a class="anchor" id="aa62bfaa81c71692d0ff3f06c800ccd0a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classImageEdge.html">ImageEdge</a>&amp; ImageGraph::getEdge </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the e-th edge in the current sorting. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">e</td><td>edge index </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aae238a2319db880455dd385c3f51cf1f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classImageNode.html">ImageNode</a>&amp; ImageGraph::getNode </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">Get</td><td>the n-th node. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>node index </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>node at index n </dd></dl>

</div>
</div>
<a class="anchor" id="ab6bd5512e2e8cec1445d24f5b1f670f8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ImageGraph::getNumComponents </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get number of connected components. </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a871c65e9e308b068341fc618c1afb63f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ImageGraph::getNumEdges </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the number of edges. </p>
<dl class="section return"><dt>Returns</dt><dd>number of edges </dd></dl>

</div>
</div>
<a class="anchor" id="ad9dc95412a7f22277475b1ddb2e3a963"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ImageGraph::getNumNodes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the number of nodes. </p>
<dl class="section return"><dt>Returns</dt><dd>number of nodes </dd></dl>

</div>
</div>
<a class="anchor" id="a7b39c32164fbca6272c5684577941e46"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ImageGraph::merge </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classImageNode.html">ImageNode</a> &amp;&#160;</td>
          <td class="paramname"><em>S_n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classImageNode.html">ImageNode</a> &amp;&#160;</td>
          <td class="paramname"><em>S_m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classImageEdge.html">ImageEdge</a> &amp;&#160;</td>
          <td class="paramname"><em>e</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Merge two pixels (that is merge two nodes). </p>
<p>Depending on the used "Distance", some lines may be commented out to speed up the algorithm.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">S_n</td><td>first node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">S_m</td><td>second node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">e</td><td>corresponding edge </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a07da5c2a67a5ddc3deea92596a81f997"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ImageGraph::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classImageGraph.html">ImageGraph</a> &amp;&#160;</td>
          <td class="paramname"><em>graph</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">graph</td><td>graph to copy </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5549bd8ab5b3c1b6fb524d33858c0afe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ImageGraph::setNode </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classImageNode.html">ImageNode</a> &amp;&#160;</td>
          <td class="paramname"><em>node</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the node of the given index. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>index of node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8c618f7f1fed0e358b0351af6c541d71"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ImageGraph::sortEdges </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sort the edges by weight. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>lib_refh/lib/<a class="el" href="image__graph_8h_source.html">image_graph.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Apr 16 2017 16:39:17 for Superpixel Benchmark by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
